package cn.com.headfree.point.dao.impl;

import cn.com.headfree.entity.TRuleProjectInfo;
import cn.com.headfree.point.dao.RuleProjectDao;
import com.gta.edu.sdk.base.dao.impl.BaseDaoImpl;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;


@Repository("ruleProjectDao")
public class RuleProjectDaoImpl extends BaseDaoImpl<TRuleProjectInfo> implements RuleProjectDao {

	@Override
	public List<TRuleProjectInfo> findProjectInfoListByPid(String pId,String orgId) {
		String sql = " select t.* from t_rule_project_info t where t.p_id = ? and org_id=? order by id ";
		List<String> list = new ArrayList<>();
		list.add(pId);
		list.add(orgId);
		return this.findAllBySQL(TRuleProjectInfo.class,sql,null,false,list.toArray());
	}
}
